With the spread of big data processing etc., demands for the increase in memory access speed and reduction in power consumption have been growing. The memory access speed greatly changes depending on the configuration of cache memories. The address requested an access is accessed again with high possibility, which is a property called temporal locality. Further, an address near the address requested an access is accessed with high possibility, which is a property called spatial locality. The temporal locality and spatial locality are in a trade-off relationship, and thus there is a likelihood that the spatial locality cannot be secured when emphasizing the temporal locality and the temporal locality cannot be secured when emphasizing the spatial locality.